package com.example.strategy;

/**
 * @version 1.0.0
 * @className: Context
 * @description:
 * @author: rosszhang
 * @date: 2022/5/16 16:56
 */
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public void operate(){
        this.strategy.operate();
    }
}
